﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentValidation;

namespace Defero.Model
{
    public class ProductValidator : AbstractValidator<Product>
    {
        public ProductValidator() 
        {
            RuleFor(e => e.Id).NotNull();
            RuleFor(e => e.Name).NotEmpty();
            RuleFor(e => e.Type).NotEmpty();
            RuleFor(e => e.Brand).NotEmpty();
        }
    }
}
